import React from 'react';

import {Switch,Link,Route,BrowserRouter} from 'react-router-dom';
import Home from './pages/home.js';
import Nofound from './pages/404.js';
import Detail from './pages/detail.js';
import Login from './pages/login.js';
import Postlist from './pages/postlist.js';
import Editor from './pages/editor.js';
import Register from './pages/register.js';
import PersonalCentral from './pages/personalCentral.js';
import Dialog from './module/dialog/example.js';
import Post from './pages/post.js';

class App extends React.Component {

	constructor(props) {
	  super(props);
	}

	render() {
		return (
			<BrowserRouter>
					<Switch>
						<Route exact path="/" component={Home}></Route>
			       		<Route path="/home" component={Home}></Route>
			        	<Route path="/404" component={Nofound}></Route>
			        	<Route path="/detail" component={Detail}></Route>
			        	<Route path="/login" component={Login}></Route>
			        	<Route path="/postlist" component={Postlist}></Route>
			        	<Route path="/editor" component={Editor}></Route>
			        	<Route path="/Register" component={Register}></Route>
			        	<Route path="/personal" component={PersonalCentral}></Route>
			        	<Route path="/dialog" component={Dialog} ></Route>
			        	<Route path="/post" component={Post} ></Route>
			        </Switch>		
        	</BrowserRouter>
		);
	}
}

export default App;
